﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YXShop.IDAL.Product
{
    public interface IProductSpecification
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        int Add(YXShop.Model.Product.ProductSpecification model);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        int Amend(YXShop.Model.Product.ProductSpecification model);
        /// <summary>
        /// 删除一条数据
        /// </summary>
        void Delete(int Id);
        /// <summary>
        /// 删除一个商品的规格
        /// </summary>
        /// <param name="ProductId"></param>
        void DeleteSpecificationProduct(int ProductId);
        /// <summary>
        /// 任意修改一个字段
        /// </summary>
        /// <param name="id"></param>
        /// <param name="columnName"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        int Amend(int id, string columnName, Object value);
        List<YXShop.Model.Product.ProductSpecification> GetSpecification(string Condition);
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        YXShop.Model.Product.ProductSpecification GetModelID(int id);
        /// <summary>
        /// 跟据ProductId查询规格
        /// </summary>
        /// <param name="ProductId">商品ID</param>
        /// <returns></returns>
        List<YXShop.Model.Product.ProductSpecification> GetSpecification(int ProductId);
    }
}
